from functools import reduce


def product_except_self(nums):
    product = reduce(lambda x, y: x * y, nums)
    return [product//num for num in nums]

print(product_except_self([1,2,3,4]))